﻿using System;
using System.ComponentModel.Composition;
using Tavis;
using Tavis.Interfaces;

namespace RESTAgent.Maze {
	public class MazeLink : Link
	{
		public override string Relation {
			get { return base.Relation; }
			set {
				base.Relation = value;
				Context = new Uri("#" + Relation, UriKind.Relative);
			}
		}
	}


    [Export("east", typeof(ILink))]
    public class EastLink : MazeLink {
        public EastLink(): base() {
            Relation = "east";
            StateChange = StateChangeType.Transfer;
        }
    }

    [Export("west", typeof(ILink))]
    public class WestLink : MazeLink {
        public WestLink() {
            Relation = "west";
            StateChange = StateChangeType.Transfer;
        }
    }

    [Export("north", typeof(ILink))]
    public class NorthLink : MazeLink {
        public NorthLink()
             {
            Relation = "north";
            StateChange = StateChangeType.Transfer;
        }
    }

    [Export("south", typeof(ILink))]
    public class SouthLink : MazeLink {
        public SouthLink() {
            Relation = "south";
            StateChange = StateChangeType.Transfer;
        }
    }

    [Export("start", typeof(ILink))]
    public class StartLink: MazeLink {
        public StartLink() {
            Relation = "start";
            StateChange = StateChangeType.Transfer;
        }
    }

    [Export("current", typeof(ILink))]
    public class CurrentLink : MazeLink {
        public CurrentLink() {
            Relation = "current";
            StateChange = StateChangeType.Transfer;

        }
    }

    [Export("exit", typeof(ILink))]
    public class ExitLink : MazeLink {
        public ExitLink() {
            Relation = "exit";
            StateChange = StateChangeType.Transfer;
        }
    }

}
